package org.clockworkmages.games.anno1186.text;

import org.clockworkmages.games.anno1186.GameBeansContext;
import org.clockworkmages.games.anno1186.scripting.ScriptingService;

class PlaceholderTextNode implements TextNode {

	private String placeholder;

	public PlaceholderTextNode(String placeholder) {
		this.placeholder = placeholder;
	}

	@Override
	public String getParsedText() {
		return GameBeansContext.getBean(ScriptingService.class)
				.eval(placeholder).toString();
	}

}